package chapter20_Annotations;

/**
 * Date: 2019/2/16
 * Time: 10:50
 * User: Driss.
 */
@ExtractInterface("IMultiplier")
public class Multiplier {
    public int multiply(int x,int y){
        int total = 0;
        for(int i = 0;i < x;i++)
            total = add(total,y);
        return total;
    }

    private int add(int x,int y){return x + y;}

    public static void main(String[] args){
        Multiplier m = new Multiplier();
        System.out.println("11 * 6 = " + m.multiply(11,6));
    }
}
